Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Create, Edit selected docs from Embed view in notes client
~Umberto Nongeroson 26.Nov.03 08:03 PM a Web browser
Notes Client 6.0.1 Windows 2000


Yes - and Yes we have in excess of 5000 notes users who do this on a daily basis - I've posted our code below it will need to be adapted for your own use

Code for creating a new document in an embeded view:
Dim Doc As NotesDocument
Dim ws As New notesUIWorkspace
Dim LIDoc As NotesDocument
Dim DB As NotesDatabase
Dim tableNumber As Integer

Set Doc = Ws.CurrentDocument.Document
Set DB = Doc.ParentDatabase
Set LIDoc = New NotesDocument(DB)
LIDoc.form = "frmLineItem"

Call ws.DialogBox("frmLineItem",True,True,False,False,False,False,"Add Line Item",LIDoc,True)

If LIDoc.Delete(0) <> "1" Then
Call LIDoc.MakeResponse(Doc)
Call LIDoc.Save(True,True)
End If

As for editing, why use a button, why not do it in the normal notes why - by double clicking in the view (code below also)

Code for editing/deleteing (in a dialogue box) an existing document in an embedded view:

'When a user double clicks on a part we want them to be able to edit it
'as notes by default will try to open the document properly, in a notes window we
'need to do some funky stuff to make it open in a dialog instead, this will ensure
'we can use this in an embeded view, and a dialog box :-)

Dim WS As New NotesUIWorkSpace
Dim docs As NotesDocumentCollection
Dim doc As NotesDocument
Dim Flag As Integer
Set docs = Source.Documents
Set doc = docs.GetFirstDocument()

Flag = WS.Dialogbox("frmLineItem",True,True,False,False,False,False,"Edit Line Item",doc,True)

If Flag Then ' they clicked ok and want to save the document (or delete it)
'If we've got the item "delete" they wanna remove it so they're the boss!!
If Doc.HasItem("Delete") Then
If Cstr(Doc.Delete(0)) = "1" Then
Call Doc.ReplaceItemValue("$REF","00000000000000000000000000000000")
Call Doc.ReplaceItemValue("Form","$TRASH")
Call Doc.Save(True,True)
WS.ViewRefresh
Exit Sub
End If
End If
Call Doc.Save(True,True)
WS.ViewRefresh
End If




Create, Edit selected docs from Emb... (~Nita Fezkroche... 26.Nov.03)
. . RE: Create, Edit selected docs from... (~Denise Feznite... 26.Nov.03)
. . . . RE: Create, Edit selected docs from... (~Nita Fezkroche... 29.Nov.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS